app.get("/getCurPosition",(req,res)=>{
    let a= ggb.getValue('a')*180/Math.PI;
    let b= ggb.getValue('b')*180/Math.PI;;
    let Bx= ggb.getXcoord("B");
    let By= ggb.getYcoord("B");
    res.send({a,b,Bx,By});
    M.geogebraReply({a,b,Bx,By});
});


app.get("/setCurPosition",async (req,res)=>{
    let a=req.params.a;
    let b=req.params.b;
    ggbApplet.evalCommand('α=' + a + '°');
    ggbApplet.evalCommand('β=' + b + '°');
    res.send(req.params);

    let r=await MIO.getCurPosition();

    M.geogebraReply( r);
});